//
//  YLLoginOutView.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/1.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLLoginOutView.h"
#import "YLGlobeHeader.h"
#import <Masonry.h>
#import "YLSwitchRootController.h"
#import "YLAccountTool.h"
#import "SCSecureHelper.h"
@implementation YLLoginOutView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUp];
    }
    return self;
}

- (void)setUp
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [self addSubview:button];
    __weak typeof(self) weakSelf = self;
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakSelf).mas_offset(30);
        make.left.mas_equalTo(weakSelf).mas_offset(10);
        make.right.mas_equalTo(weakSelf).mas_offset(-10);
        make.height.mas_equalTo((YLScreenW - 20) / 692.0 * 80);
    }];
    button.backgroundColor = YLMainColor;
    [button setTitle:@"退出登录" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(loginOut) forControlEvents:UIControlEventTouchUpInside];
    button.layer.masksToBounds = YES;
    button.layer.cornerRadius = 2.0;
}

- (void)loginOut
{
    
    if (self.loginOutBlock) {
        self.loginOutBlock();
    }
    
       
}

@end
